// 消息提示
export function msg(content) {
    uni.showToast({
        title: content,
        icon: 'none',
    });
}
// 错误消息
export function msgError(content) {
    uni.showToast({
        title: content,
        icon: 'error',
    });
}
// 成功消息
export function msgSuccess(content) {
    uni.showToast({
        title: content,
        icon: 'success',
    });
}
// 隐藏消息
export function hideMsg() {
    uni.hideToast();
}
// 弹出提示
export function alert(content) {
    uni.showModal({
        title: '提示',
        content: content,
        showCancel: false,
    });
}
// 确认窗体
export function confirm(content) {
    return new Promise((resolve, reject) => {
        uni.showModal({
            title: '系统提示',
            content: content,
            success: function (res) {
                if (res.confirm) {
                    resolve(res.confirm);
                }
            },
        });
    });
}
// 提示信息
export function showToast(option) {
    if (typeof option === 'object') {
        uni.showToast(option);
    } else {
        uni.showToast({
            title: option,
            icon: 'none',
            duration: 2500,
        });
    }
}
// 打开遮罩层
export function loading(content) {
    uni.showLoading({
        title: content,
        icon: 'none',
    });
}
// 关闭遮罩层
export function closeLoading() {
    uni.hideLoading();
}

// 自动导入的方法
export const autoImportList = ['msg', 'msgError', 'msgSuccess', 'hideMsg', 'alert', 'confirm', 'showToast', 'loading', 'closeLoading'];
export const lodashList = [
    'clone',
    'cloneDeep',
    'merge',
    'mergeWith',
    'isEqual',
    'isArray',
    'uniqBy',
    'isDate',
    'isElement',
    'isFunction',
    'isString',
    'isObject',
    'throttle',
    'debounce',
    'isNumber',
    'omit',
    'shuffle',
    'minBy',
    'maxBy',
];
